<template>
  <div>
    <el-tabs v-model="activeName">
      <el-tab-pane label="充值报表" name="first">
        <charge />
      </el-tab-pane>
      <el-tab-pane label="积分明细" name="second">
        <score />
      </el-tab-pane>
      <el-tab-pane label="办卡明细" name="three">
        <cardrecord />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  import charge from "./charge";
  import score from "./score";
  import cardrecord from "./cardrecord";

  export default {
    data() {
      return {
        activeName: 'first',
      };
    },
    watch: {
        '$route' (to, from) {
            // if(this.$route.path.indexOf("noticelog") != -1){
            //   this.getData(this.$route.query.activeName)
            // }
        }
    },
    methods: {
      async getData (activeName) {
        if(!activeName){
          this.activeName = 'first'
          return
        }
        this.activeName = activeName
      }
    },
    mounted:function(){

    },
    components: {
      charge,
      score,
      cardrecord,
    }
  };
</script>

<style>
</style>
